<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>问题详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="">
    <link rel="stylesheet" href="/static/index/layui/css/layui.css">
    <link rel="stylesheet" href="/static/index/css/global.css">
    <link rel="stylesheet" href="/static/index/css/detail.css">
    <script src="/static/index/layui/layui.js"></script>
    <script src="/static/admin/js/jquery-3.2.1.min.js"></script>
</head>

<body>
    <iframe  src="../head" scrolling="no" width="100%" height="65px" ></iframe>
    
    <div class="main layui-clear">
        <div class="wrap">
            <div class="content detail">
                <div class="fly-panel detail-box">

                    <h1>{$problem['zz_problem_tit']}</h1>
                    <div class="fly-tip fly-detail-hint" data-id="">
                        <!--<span class="fly-tip-stick">置顶帖</span><span class="jie-admin"> <a-->
                        <!--href="">点击置顶</a> </span> <span-->
                        <!--class="layui-btn layui-btn-mini jie-admin"> <a href="">取消置顶</a>-->
                        <!--</span> -->

                        {if !empty($user['user_status'])}
                        <span class="jie-admin" type="del" id="a1">
                            <a class="updel" pid="{$problemId}">删除该帖</a>
                        </span>
                        {else}
                        <br>
                        {/if}

                        <div class="fly-list-hint">
                            <i class="iconfont" title="回答">&#xe60c;</i> {$count}
                        </div>
                    </div>

                    <div class="detail-about">
                        <a class="jie-user" href="">
                            {if empty($user['zz_icon'])}
                            <img src="/static/index/images/uer.jpg" alt="头像">
                            {else}
                            <img src="/static/index/uploads/{$user['zz_icon']}" alt="头像">
                            {/if}
                            <cite> {$user['zz_name']}
                                <em>{$problem['zz_problem_time']}发布</em>
                            </cite>
                        </a>

                        <div class="detail-hits" data-id="{{rows.id}}">
                            <span class="layui-btn layui-btn-mini jie-admin">
                                <a href="#">已完帖，无法编辑</a>
                            </span>
                            <span id="col" class="layui-btn layui-btn-mini jie-admin" type="collect" data-type="add">
                                <a id="collectPost" class="collect" pid="{$problemId}" uid="{$userId['zz_id']}">收藏</a>
                            </span>
                            <span id="discol" class="layui-btn layui-btn-mini jie-admin  layui-btn-danger " type="collect" data-type="add" style="display:none;">
                                <a class="discollect" pid="{$problemId}" uid="{$userId['zz_id']}">取消收藏</a>
                            </span>
                        </div>
                    </div>

                    <div class="detail-body photos" id="a2">
                        <p>{$problem['zz_problem_content']}</p>
                    </div>
                </div>

                <div class="fly-panel detail-box" id="a3">
                    <a name="comment"></a>
                    <ul class="jieda photos" id="jieda">
                        {if condition = "$comment"}
                        {volist name="comment" id='v'}
                        <li data-id="12" class="jieda-daan">
                            <a name="item-121212121212"></a>

                            <div class="detail-about detail-about-reply">
                                <!--评论者名字-->
                                <a class="jie-user" href="">
                                    {if empty($v['zz_icon'])}
                                    <img src="/static/index/images/uer.jpg" alt="">
                                    {else}
                                    <img src="/static/index/uploads/{$v['zz_icon']}" alt="">
                                    {/if}
                                    <cite><i>{$v['zz_admin_name']}</i></cite>
                                </a>

                                <!--评论时间-->
                                <div class="detail-hits">
                                    <span>{$v["zz_comment_time"]}</span>
                                </div>

                                <!--判断是否是采纳-->
                                {if $v['zz_comment_status'] == 1}
                                <i class="iconfont icon-caina" title="最佳答案"></i>
                                {/if}
                            </div>

                            <!--评论内容-->
                            <div class="detail-body jieda-body">
                                <p>{$v['zz_comment_content']}</p>
                            </div>

                            <div class="jieda-reply">
                                <!--点赞个数-->
                                <!--<span class="jieda-zan zanok" type="zan">-->
                                    <!--<i class="iconfont icon-zan"></i>-->
                                    <!--<em>12</em>-->
                                <!--</span>-->

                                {if !empty($user['user_status'])}
                                <!--判断是否是当前问题的作者登录-->
                                <div class="jieda-admin">
                                    <!--判断是否被采纳-->
                                    {if $v['zz_comment_status'] == 1}
                                    <span class="jieda-accept" type="accept">已采纳</span>
                                    {else}
                                    <span type="del" class="del" data-id="{$v['zz_comment_id']}">删除</span>
                                    <span class="jieda-accept com" type="accept" pid="{$problemId}" data-id="{$v['zz_comment_id']}">采纳</span>
                                    {/if}
                                </div>
                                {/if}
                                <br>
                            </div>
                        </li>
                        {/volist}
                        {else /}
                        <li class="fly-none">没有任何回答</li>
                        {/if}
                    </ul>

                    <!--回答模块-->
                    <span id="toName">@ {$user['zz_name']}(楼主)</span>
                    <div class="layui-form layui-form-pane">

                        <form action="../doanswer/{$problem['zz_problem_id']}" method="get" class="layui-form">
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <textarea id="L_content" name="zz_comment_content" lay-verify="required" placeholder="我要回答" class="layui-textarea fly-editor" id="a4"></textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <button class="layui-btn" lay-filter="*" lay-submit>
                                    提交回答
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

        <!--详情页 右边 热帖 和 热议-->
        <div class="edge">
            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">最近热帖</dt>
                {volist name="res" id="v"}
                <dd>
                    <a href="../details/{$v['zz_problem_id']}">{$v['zz_problem_tit']}</a>
                    <span>
                        <i class="iconfont">&#xe60c;</i> {$v['num']}
                    </span>
                </dd>
                {/volist}
            </dl>

            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">近期热议</dt>
                {volist name="res" id="v"}
                <dd>
                    <a href="../details/{$v['zz_problem_id']}">{$v['zz_problem_tit']}</a>

                    <span>
                        <i class="iconfont">&#xe60c;</i> {$v['num']}
                    </span>
                </dd>
                {/volist}
            </dl>
        </div>
    </div>

    <script type="text/javascript" charset="utf-8" src="/static/index/js/kindeditor.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/index/js/detail.js"></script>
</body>
</html>